package sv.gob.mh.dgii.model;
// Generated 05-27-2010 10:16:02 AM by Hibernate Tools 3.2.2.GA


import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * GdUsuarioXDo generated by hbm2java
 */
@Entity
@Table(name="GD_USUARIO_X_DO"
    ,schema="GDOCCALIDAD"
)
public class GdUsuarioXDo  implements java.io.Serializable {


     private GdUsuarioXDoId id;
     private GdFirmasAutor gdFirmasAutor;
     private GdDocumento gdDocumento;
     private Date fingreso;

    public GdUsuarioXDo() {
    }

    public GdUsuarioXDo(GdUsuarioXDoId id, GdFirmasAutor gdFirmasAutor, GdDocumento gdDocumento, Date fingreso) {
       this.id = id;
       this.gdFirmasAutor = gdFirmasAutor;
       this.gdDocumento = gdDocumento;
       this.fingreso = fingreso;
    }
   
     @EmbeddedId
    
    @AttributeOverrides( {
        @AttributeOverride(name="ndocumento", column=@Column(name="N_DOCUMENTO", nullable=false, length=9) ), 
        @AttributeOverride(name="nedicion", column=@Column(name="N_EDICION", nullable=false, length=2) ), 
        @AttributeOverride(name="cusuario", column=@Column(name="C_USUARIO", nullable=false, length=30) ), 
        @AttributeOverride(name="mestado", column=@Column(name="M_ESTADO", nullable=false, length=1) ) } )
    public GdUsuarioXDoId getId() {
        return this.id;
    }
    
    public void setId(GdUsuarioXDoId id) {
        this.id = id;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="C_USUARIO", nullable=false, insertable=false, updatable=false)
    public GdFirmasAutor getGdFirmasAutor() {
        return this.gdFirmasAutor;
    }
    
    public void setGdFirmasAutor(GdFirmasAutor gdFirmasAutor) {
        this.gdFirmasAutor = gdFirmasAutor;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumns( { 
        @JoinColumn(name="N_DOCUMENTO", referencedColumnName="N_DOCUMENTO", nullable=false, insertable=false, updatable=false), 
        @JoinColumn(name="N_EDICION", referencedColumnName="N_EDICION", nullable=false, insertable=false, updatable=false) } )
    public GdDocumento getGdDocumento() {
        return this.gdDocumento;
    }
    
    public void setGdDocumento(GdDocumento gdDocumento) {
        this.gdDocumento = gdDocumento;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="F_INGRESO", nullable=false, length=7)
    public Date getFingreso() {
        return this.fingreso;
    }
    
    public void setFingreso(Date fingreso) {
        this.fingreso = fingreso;
    }




}


